<?php

namespace Catalog;

use Doctrine\ORM\Mapping as ORM;

/**
 * Catalog\SubCategory
 *
 * @ORM\Table(name="sub_category")
 * @ORM\Entity
 */
class SubCategory
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer", nullable=false)
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="IDENTITY")
     */
    private $id;

    /**
     * @var string $name
     *
     * @ORM\Column(name="name", type="string", length=255, nullable=false)
     */
    private $name;

    /**
     * @var boolean $isDel
     *
     * @ORM\Column(name="is_del", type="boolean", nullable=false)
     */
    private $isDel;

    /**
     * @var Catalog\Category
     *
     * @ORM\ManyToOne(targetEntity="Catalog\Category")
     * @ORM\JoinColumns({
     *   @ORM\JoinColumn(name="category_id", referencedColumnName="id")
     * })
     */
    private $category;



    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set name
     *
     * @param string $name
     * @return SubCategory
     */
    public function setName($name)
    {
        $this->name = $name;
        return $this;
    }

    /**
     * Get name
     *
     * @return string 
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Set isDel
     *
     * @param boolean $isDel
     * @return SubCategory
     */
    public function setIsDel($isDel)
    {
        $this->isDel = $isDel;
        return $this;
    }

    /**
     * Get isDel
     *
     * @return boolean 
     */
    public function getIsDel()
    {
        return $this->isDel;
    }

    /**
     * Set category
     *
     * @param Catalog\Category $category
     * @return SubCategory
     */
    public function setCategory(\Catalog\Category $category = null)
    {
        $this->category = $category;
        return $this;
    }

    /**
     * Get category
     *
     * @return Catalog\Category 
     */
    public function getCategory()
    {
        return $this->category;
    }
}